
#Conditionally import wlstModule only when script is executed with jython
if __name__ == '__main__': 
    from wlstModule import *#@UnusedWildImport

def enroll():
    print 'starting the script ....'
    username = '${WLST_AS_USER}'
    password = '${WLST_AS_PASS}'
    url='${WLST_AS_URL}'
    connect(username,password,url)
    nmEnroll('${ANT_DOMAIN_HOME}', '${ANT_NM_HOME}')
    
def addMachine():
    cd('/')
    cmo.createUnixMachine('${ANT_HOSTNAME}')

    cd('/Machines/${ANT_HOSTNAME}/NodeManager/${ANT_HOSTNAME}')
    cmo.setNMType('Plain')
    cmo.setListenPort(${ANT_NM_PORT})
    cmo.setListenAddress('${ANT_NM_IP}')
    cmo.setDebugEnabled(false)
    
def monitorRunningServers():

if __name__== "main":
    enroll()
    
